package com.audaque.springboot.foshanupload.web.streamdemo.annoMode.controller;

import com.audaque.springboot.foshanupload.web.streamdemo.annoMode.provider.IMessageProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("iMessageProvider")
@RestController
public class IMessageProviderController {

  @Autowired
  private IMessageProvider iMessageProvider;

  @GetMapping("send")
  public void send(String msg) {
    iMessageProvider.send(msg);
  }

  @GetMapping("send/{channel}")
  public void send(String msg,@PathVariable(value = "channel") String channel) {
    iMessageProvider.send(msg,channel);
  }





}
